<h1>МАрки автомобилей</h1>
<div class="extended_find">
	<div class="brands">
		<?php $first = reset($manufacturers);?>
		<?php foreach ($manufacturers as $id => $name):?>
			<div id="<?php echo strtolower($name);?>" data-manufacturer="<?php echo $id;?>" class="<?php echo $first == $name ? 'active' : '';?>">
				<?php echo $name;?>
			</div>
		<?php endforeach;?>
	</div>
	<div class="cars">
		<?php foreach ($manufacturers as $id => $name):?>
			<div class="car_logo" id="<?php echo strtolower($name);?>_logo" style="<?php echo $first == $name ? 'display:block' : '';?>">
				<img src="<?php echo Yii::app()->request->baseUrl; ?>/img/<?php echo strtolower($name);?>_logo.jpg"/>
			</div>
		<?php endforeach;?>
		<div class="cars_img">
			<?php foreach ($manufacturers as $id => $name):?>
				<img id="<?php echo strtolower($name);?>_car" 
					src="/img/<?php echo strtolower($name);?>_car.jpg"  
					style="<?php echo $first == $name ? 'display:block' : '';?>"/>
			<?php endforeach;?>
		</div>
		<div class="line">
			<div id="electric_element_l"></div>
			<div id="equipment_l"></div>
			<div id="locksmith_part_l"></div>
			<div id="accessories_l"></div>
			<div id="spare_parts_l"></div>
		</div>
		<div class="item">
			<div id="electric_element">Электрический элемент</div>
			<div id="equipment">Оборудование</div>
			<div id="locksmith_part">Слесарная часть</div>
			<div id="accessories">Аксессуары</div>
			<div id="spare_parts">Кузовная часть</div>
		</div>                            
	</div>
	<div class="list_model">
		<?php foreach ($manufacturers as $id => $name):?>
			<div class="columnizer" id="<?php echo strtolower($name);?>_model_list">
				<ul style="<?php echo $first == $name ? 'display:block' : '';?>">
					<?php foreach ($models[$id] as $model):?>
						<li data-model="<?php echo $model['MOD_ID'];?>"><?php echo $model['TEX_TEXT'];?></li>
					<?php endforeach;?>
				</ul>
			</div>
		<?php endforeach;?>
	</div>
	<div class="param">
		<div class="selected_param">
			Вы выбрали: 
			<span class="selected_brand"><?php echo $first;?></span>
			<span class="selected_model"><span>1007</span><img src="<?php echo Yii::app()->request->baseUrl; ?>/img/remove_param.png"/></span>
			<span class="selected_item"><span>Слесарная часть</span><img src="<?php echo Yii::app()->request->baseUrl; ?>/img/remove_param.png"/></span>
		</div>
		<?php echo CHtml::beginForm($this->createUrl('/catalog/search/index')); ?>
		<?php echo CHtml::hiddenField('manufacturer', '', array('class'=>'car_brand_selected')); ?>
		<?php echo CHtml::hiddenField('model', '', array('class'=>'car_model_selected')); ?>
		<?php echo CHtml::submitButton('перейти >>', array('class'=>'type_button extended_find_button')); ?>
		<?php echo CHtml::endForm(); ?>
	</div>
</div>
<hr size="1">